<?php
/**
 * Created by PhpStorm.
 * User: Admin
 * Date: 2019/11/22
 * Time: 10:25
 */
echo $str;
?>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<form action="/index.php?r=curl/get" method="post">
    <input name="value" id="tijiao">
    <button id="tijiao">提交</button>
</form>

<script>
    var list = [];
$(".bs_index3").each(function (i,item) {
    var box = $(item);
    var tmp = [];
    box.find("a").each(function (index,item_a) {
        var ths = $(item_a);
        var item = {}
        item.title = ths.attr("title");
        item.word = ths.text();
        item.href = ths.attr("href");
        tmp.push(item);
    });
    list.push(tmp);
});
$("#tijiao").val(JSON.stringify(list));
</script>
